import api from '../api'

export class RoleApi extends api {
  getNoMenuApis () {
    return this.request({
      url: `${this.servicePath}/${this.modulePath}/getNoMenuApis`,
      method: 'get'
    })
  }

  getAllMenusWithoutSuper () {
    return this.request({
      url: `${this.servicePath}/${this.modulePath}/getAllMenusWithoutSuper`,
      method: 'get'
    })
  }

  getRoleByRoleId (id) {
    return this.request({
      url: `${this.servicePath}/${this.modulePath}/role/${id}`,
      method: 'get'
    })
  }

  updateRole (form) {
    return this.request({
      url: `${this.servicePath}/${this.modulePath}/role`,
      method: 'put',
      data: form
    })
  }
}
export default new RoleApi('roleApi')
